﻿using NodeEditor;

namespace ETHotfix
{
    [NodeEvent(typeof(BooleanNode))]
    public class BooleanNodeHandle : NodeHandle<BooleanNode>
    {
        const string valueStr = "value";
        const string value2Str = "value2";
        protected override void OnHandle(RuntimeTree runtimeTree, RuntimeNode runtimeNode, BooleanNode data, Unit unit)
        {
            data.value = runtimeNode.GetInputValue(valueStr, data.value);
            data.value2 = runtimeNode.GetInputValue(value2Str, data.value2);
            data.result = data.value == data.value2;
        }
    }
}